import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';
import { PermissionEnum } from '@/enums/permissionEnum'

const route: AppRouteModule = {
  path: '/connection',
  name: 'connection',
  component: LAYOUT,
  redirect: '/connection/index',
  meta: {
    orderNo: 1000,
    icon: 'ant-design:link-outlined',
    title: '企业互联',
    permissions: [PermissionEnum.CONNECTION_VIEW, PermissionEnum.CONNECTION_MANAGE, PermissionEnum.TEMPLATE_VIEW, PermissionEnum.TEMPLATE_MANAGE],
  },
  children: [
    {
      path: 'index',
      name: 'connection',
      component: () => import('@/views/wex/connection/index.vue'),
      meta: {
        title: '互联管理',
        permissions: [PermissionEnum.CONNECTION_VIEW, PermissionEnum.CONNECTION_MANAGE],
      },
    },
    {
      path: 'entity',
      name: 'entity',
      component: () => import('@/views/wex/entity/index.vue'),
      meta: {
        title: '数据配置',
        permissions: [PermissionEnum.MODEL_VIEW, PermissionEnum.MODEL_MANAGE],
      },
    },
    {
      path: 'certificate-template',
      name: 'certificate-template',
      component: () => import('@/views/wex/certificateTemplate/index.vue'),
      meta: {
        title: '授权模板',
        permissions: [PermissionEnum.TEMPLATE_VIEW, PermissionEnum.TEMPLATE_MANAGE],
      },
    },
  ],
};

export default route;
